<template>
  <Modal
    :is-show="isShow"
    :is-confirm="true"
    @cancel-action="$emit('cancelAction', false)"
    @commit-action="$emit('commitAction')"
  >
    <div class="sm:flex">
      <span
        class="mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-red-100 sm:mx-0 sm:h-10 sm:w-10 text-red-600"
      >
        <svg
          width="24"
          height="24"
          xmlns="http://www.w3.org/2000/svg"
          fill="none"
          viewBox="0 0 24 24"
          stroke="currentColor"
          aria-hidden="true"
        >
          <path
            stroke-linecap="round"
            stroke-linejoin="round"
            stroke-width="2"
            d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z"
          />
        </svg>
      </span>

      <div class="mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left">
        <h3
          id="modal-headline"
          class="text-lg leading-6 font-medium text-gray-900"
        >
          {{ $t('deletion') }}
        </h3>
        <div class="mt-2">
          <p class="text-sm text-gray-500">
            {{ $t('note') }}
          </p>
        </div>
      </div>
    </div>
  </Modal>
</template>

<script lang="ts" setup>
import Modal from "@/components/Modal.vue";

defineProps({
  isShow: {
    type: Boolean,
    default: false,
  },
});

defineEmits(['cancelAction', 'commitAction'])
</script>